<html>
<head>
    <meta charset="utf-8">
    <title>文件上传</title>
</head>
<body>
<h3>传统方式上传文件</h3>
<form method="post" action="file/upload1" enctype="multipart/form-data">
    <input name="username" placeholder="请输入用户名"><br>
    <input type="file" name="file"><br>
    <button type="submit">提交</button>
</form>

<h3>springmvc方式上传文件</h3>
<form method="post" action="file/upload2" enctype="multipart/form-data">
    <input name="username" placeholder="请输入用户名"><br>
    <input type="file" name="file"><br>
    <button type="submit">提交</button>
</form>

<h3>跨服务器方式上传文件</h3>
<form method="post" action="file/upload3" enctype="multipart/form-data">
    <input name="username" placeholder="请输入用户名"><br>
    <input type="file" name="file"><br>
    <button type="submit">提交</button>
</form>

<h3>文件下载</h3>
<!--由于IE参数编码问题，建议js转码后再发送请求-->
<a href="download?filename=图片1.jpg">下载图片</a>
</body>
</html>
